﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yes.Domain.Enum;

namespace Yes.Domain.Entity
{
    /// <summary>
    /// 评论
    /// </summary>
    [Table("Comment")]
    public class CommentEntity : EntityBase
    {
        /// <summary>
        /// 评论人Id
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        /// 评论人昵称
        /// </summary>
        [StringLength(10)]
        public string NickName { get; set; }

        /// <summary>
        /// 文章ID
        /// </summary>
        public int ArticleId { get; set; }

        /// <summary>
        /// 链接
        /// </summary>
        [StringLength(50)]
        public string Url { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [StringLength(50)]
        public string Email { get; set; }

        /// <summary>
        /// IP
        /// </summary>
        [StringLength(20)]
        public string Ip { get; set; }

        /// <summary>
        /// 评论时间
        /// </summary>
        public DateTime PostDate { get; set; }

        /// <summary>
        /// 评论内容
        /// </summary>
        [StringLength(200)]
        public string Content { get; set; }

        /// <summary>
        /// 评论状态
        /// </summary>
        public CommentStatusEnum Status { get; set; }

        /// <summary>
        /// USER AGENT
        /// </summary>
        [StringLength(200)]
        public string UserAgent { get; set; }

        /// <summary>
        /// 父评论ID
        /// </summary>
        public int ParentId { get; set; }
    }
}
